<%@ page import="com.blog.service.impl.RightServiceImpl"%>
<%@ page import="com.blog.service.RightService"%>
<%@ page import="com.blog.service.CategoryService"%>
<%@ page import="com.blog.service.impl.CategoryServiceImpl"%>
<%@ page import="com.blog.service.PhotoService"%>
<%@ page import="com.blog.service.impl.PhotoServiceImpl"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href="<%=basePath%>}">
<%

    RightService rightService=new RightServiceImpl();
    CategoryService categoryService=new CategoryServiceImpl();
    PhotoService photoService=new PhotoServiceImpl();


    request.setAttribute("right",rightService.selRight());
    request.setAttribute("ShowCategory",categoryService.selAllCategory());
    request.setAttribute("HeaderPhoto",photoService.selPhoto(1));
    request.setAttribute("showCategoryCount",categoryService.selAllCategoryCount());
    request.setAttribute("CategoryBlogCount",categoryService.selCategoryBlogCount());
%>
<!DOCTYPE html>
<html lang="zh-CN" data-theme="light">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>分类</title>
<meta name="description">
<meta name="theme-color" content="#ffffff">
<link rel="shortcut icon" href="blog/img/favicon.png">
<link rel="stylesheet" href="blog/css/index.css">
<link rel="stylesheet"
	href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css">
<link rel="stylesheet"
	href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css">
<style type="text/css">
#nav {
	opacity: 1
}

.justified-gallery img {
	opacity: 1
}
/* 背景 */
#page-header {
	background-image: url(blog//img/分类.jpg);
	background-attachment: local !important;
}

#page-header.full_page {
	height: 50vh !important;
}
</style>
<script src="blog//js/global_config.js"></script>
<script id="config_change" src="blog//js/global_change.js"></script>
<script src="blog//js/set_theme.js"></script>
<meta name="generator" content="Hexo 5.1.1">
</head>
<body>
	<!-- 引入头部 -->
	<jsp:include page="header.jsp" flush="true" />
	<div id="body-wrap">
		<main class="layout_page" id="content-inner">
		<div class="category-content">
			<div class="category-lists">
				<div class="category__title">
					分类 - <span class="category__amount">${requestScope.showCategoryCount}</span>
				</div>
				<div>
					<ul class="category-list">
						<c:forEach items="${requestScope.CategoryBlogCount}"
							var="BlogCount">
							<li class="category-list-item"><a class="category-list-link"
								href="blog/detailCategory.jsp?CategoryName=${BlogCount.name}">${BlogCount.name}</a>
								<span class="category-list-count">${BlogCount.count}</span></li>
						</c:forEach>
					</ul>
				</div>
			</div>
		</div>
		<!-- 	引入侧边栏 --> <jsp:include page="right.jsp" flush="true" /> </main>
		<!-- 引入页脚 -->
		<jsp:include page="footer.jsp" flush="true" />
	</div>
	<section id="rightside">
		<div id="rightside-config-hide">
			<button id="darkmode" type="button" title="浅色和深色模式转换">
				<i class="fas fa-adjust"></i>
			</button>
		</div>
		<div id="rightside-config-show">
			<button id="rightside_config" type="button" title="设置">
				<i class="fas fa-cog"></i>
			</button>
			<button id="go-up" type="button" title="回到顶部">
				<i class="fas fa-arrow-up"></i>
			</button>
		</div>
	</section>
	<div>
		<script src="blog/js/jquery.min.js"></script>
		<script
			src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script>
		<script src="blog/js/utils.js"></script>
		<script src="blog/js/main.js"></script>
		<script src="https://cdn.jsdelivr.net/npm/typed.js"></script>
		<script
			src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script>
	</div>
</body>

</html>